<ion-modal-view>
  <ion-header-bar class="bar-assertive">
    <button  class="button button-clear" ng-click="closeSeedModal()">
      <i class="icon ion-ios-close"></i>
    </button>
    <div class="h1 title">Import from Seed</div>
    <button class="button button-clear " on-touch="scanSeed()">
      <i class="icon ion-ios-camera-outline"></i>
    </button>
  </ion-header-bar>
  <ion-content class="has-header scrollBg" padding="'true'">
  <form name="formImport" ng-submit="importSeedWallet(formImport)">
    <div class="list">
      <label class="item item-input">
        <textarea ng-model="formImport.seed"  rows="5" placeholder="insert seed passphrase or scan your backup"></textarea>
      </label>
      <label class="item item-text-wrap">
        Set strong password to encrypt your wallet and a 4 digit PIN to secure access.
      </label>
      <ion-toggle ng-model="legacy" ng-click="setLegacy(legacy)">
        Restore legacy address pre v0.11.0 
      </ion-toggle>
      <label class="item item-input">
        <span class="input-label">Password</span>
        <input type="password" ng-model="formImport.password" placeholder="8 to 20 digit alphanumeric" required="true" ng-minlength="8" ng-maxlength="20" ng-pattern="/(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z])/" required>
      </label>
      <label class="item item-input">
        <span class="input-label">Confirm</span>
        <input type="password" ng-model="formImport.confirmPassword" placeholder="enter password again" required="true" ng-minlength="8" ng-maxlength="20" ng-pattern="/(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z])/" required>
      </label>
      <label class="item item-input padding-bottom">
        <span class="input-label">Code</span>
        <input type="password" ng-model="formImport.code" pattern="[0-9]*" maxlength="4" minlength="4" placeholder="4 digit code" onkeypress='return event.charCode >= 48 && event.charCode <= 57' required>
      </label>
      <button ng-disabled="!formImport.$valid || confirmPassword!=password"   class="button button-block button-energized" type="submit">Import</button>
    </div>  
  </form>    
  </ion-content>
</ion-modal-view>


